﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using Antu.WebControls;
using Antu.Core.Components;
using Antu.Core.Services;
using System.Web.UI.WebControls;
using EluZSProvider;
using System.Web;
using System.Data;

namespace WebSys.UI.Control.ZhengShou
{
    public class ZS_BCJDLRDeleteControl : MPBasicTemplate
    {
        EluZSDataProvider _EluZSDataProvider = (EluZSDataProvider)ProviderService.ProviderServiceMange.GetProvider("EluZSProvider");
        public string userid = string.Empty;
        protected override void OnLoad(EventArgs e)
        {
            if (HttpContext.Current.Session["UserID"] == null)
            {
                Antu.Utilities.UtilitiesPage.AlertDialogClear("登录超时，请重新登录！", "window.parent.location.href('../login.aspx');");
            }
            else
            {
                userid = HttpContext.Current.Session["UserID"].ToString();
            }
            base.OnLoad(e);
            if (!base.Page.IsPostBack) {
                string i = base.Page.Request["iSession"];
                if (!string.IsNullOrEmpty(i))
                {
                    base.Page.Session["nCount"] = i;
                }
                string id = base.Page.Request["id"];
                string tableName = base.Page.Request["tableName"];
                if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(tableName))
                {
                    _EluZSDataProvider.DeleteXmByID(tableName, "id", id);
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptbasic1", "<script>windowClose();</script>");
                }

            }
        }
    }
}


